package com.icw.decoupling.defi.module;

import java.util.List;
import java.util.Map;

import com.icw.basis.BaseInterface;
import com.icw.basis.BasePoEntity;
import com.icw.utility.query.IcwCriteria;
import com.icw.utility.query.PageCount;

public interface GenericSrv<T extends BasePoEntity> extends BaseInterface {

	T one(String id) throws Exception;

	T save(T t) throws Exception;

	List<T> queryEntitiesByCriteriaWithPage(IcwCriteria criteria, PageCount page) throws Exception;

	void delete(T obj) throws Exception;

	int countByCriteria(IcwCriteria criteria) throws Exception;

	int updateByCriteria(Map<String, Object> contains, IcwCriteria cri) throws Exception;

	int deleteByCriteria(IcwCriteria cri) throws Exception;

	T findByName(String name) throws Exception;
}
